package com.demoo.zjsu.service.smartwebsite;

import com.demoo.zjsu.service.smartwebsite.bwc.LostAndFoundService;
import com.demoo.zjsu.service.smartwebsite.jwc.JiaowuService;
import com.demoo.zjsu.service.smartwebsite.zhaoban.IndexPage2;
import com.demoo.zjsu.service.smartwebsite.zhaoban.IndexPage3;
import com.demoo.zjsu.service.smartwebsite.zhaoban.LocaleService;
import com.demoo.zjsu.service.smartwebsite.zhaoban.PlanService;
import com.demoo.zjsu.service.smartwebsite.zjgsu.*;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * Created by jshjsh on 2016/8/30.
 */
@Service
public class Quetz {

    @Autowired
    PageResolver pageResolver;

    Logger logger = Logger.getLogger(getClass());

    @Scheduled(cron = "0 0 2 * * ?")
//@Scheduled(cron = "0 35 10 * * ?")
    public void quertzSchoolViewService(){
        logger.warn("quertzSchoolViewService");
        pageResolver.resolver(SchoolViewService.class);
    }

    @Scheduled(cron = "5 2 2 * * ?")
//@Scheduled(cron = "0 36 10 * * ?")
    public void quertzIndexPhotoPageService(){
        logger.warn("quertzIndexPhotoPageService");
        pageResolver.resolver(IndexPhotoPageService.class);
    }
//    @Scheduled(cron = "0 4 2 * * ?")
    @Scheduled(cron = "10 6 0 * * ?")
    public void quertzNewsPageService(){
        logger.warn("quertzNewsPageService");
        pageResolver.resolver(NewsPageService.class);
    }
//    @Scheduled(cron = "0 38 10 * * ?")
    @Scheduled(cron = "15 6 2 * * ?")
    public void quertzPhonePageService(){
        logger.warn("quertzPhonePageService");
        pageResolver.resolver(PhonePageService.class);
    }
//    @Scheduled(cron = "0 39 10 * * ?")
    @Scheduled(cron = "20 8 2 * * ?")
    public void quertzBigEventService(){
        logger.warn("quertzBigEventService");
        pageResolver.resolver(BigEventService.class);
    }
//    @Scheduled(cron = "0 40 10 * * ?")
    @Scheduled(cron = "0 10 2 * * ?")
    public void quertzIndexPageService(){
        logger.warn("quertzIndexPageService");
        pageResolver.resolver(IndexPageService.class);
    }
//    @Scheduled(cron = "0 41 10 * * ?")
    @Scheduled(cron = "30 12 2 * * ?")
    public void quertzGuideTeacherServcie(){
        logger.warn("quertzGuideTeacherServcie");
        pageResolver.resolver(GuideTeacherServcie.class);
    }
//    @Scheduled(cron = "0 42 10 * * ?")
    @Scheduled(cron = "35 14 2 * * ?")
    public void quertzBasePackageFactory(){
        logger.warn("quertzBasePackageFactory");
        pageResolver.resolver("basePackageFactory");
    }
//    @Scheduled(cron = "0 30 18 * * ?")
    @Scheduled(cron = "35 16 2 * * ?")
    public void quertzLost(){
        logger.warn("quertzLost");
        PageResolver pageResolver = new PageResolver();
        pageResolver.resolver(LostAndFoundService.class);
    }

//    @Scheduled(cron = "0 44 10 * * ?")
    @Scheduled(cron = "35 18 2 * * ?")
    public void quertzZhanbanIndex(){
        logger.warn("quertzZhanbanIndex");
        pageResolver.resolver("indexService");
    }

//    @Scheduled(cron = "0 45 10 * * ?")
    @Scheduled(cron = "35 20 2 * * ?")
    public void quertzIndexPage2(){
        logger.warn("quertzIndexPage2");
        pageResolver.resolver(IndexPage2.class);
    }
//    @Scheduled(cron = "0 46 10 * * ?")
    @Scheduled(cron = "35 22 2 * * ?")
    public void quertzIndexPage3(){
        logger.warn("quertzIndexPage3");
        pageResolver.resolver(IndexPage3.class);
    }
//    @Scheduled(cron = "0 44 9 * * ?")
    @Scheduled(cron = "35 24 2 * * ?")
    public void quertzLocaleService(){
        logger.warn("quertzLocaleService");
        pageResolver.resolver(LocaleService.class);
    }

//    @Scheduled(cron = "0 45 9 * * ?")
    @Scheduled(cron = "35 26 2 * * ?")
    public void quertzPlanService(){
        logger.warn("PlanService");
        pageResolver.resolver(PlanService.class);
    }

//    @Scheduled(cron = "0 49 10 * * ?")
    @Scheduled(cron = "0 28 2 * * ?")
    public void quertzJiaowuService(){
        logger.warn("JiaowuService");
        pageResolver.resolver(JiaowuService.class);
    }

}
